package com.kimu.product_service_interface.entity;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;

import lombok.Data;
import lombok.RequiredArgsConstructor;

@Data
@RequiredArgsConstructor
@TableName("`products`")
public class Product implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value="id", type = IdType.ASSIGN_ID)
    private Long id;

    private String name;

    private String description;

    private BigDecimal price;

    private Integer stock;

    private String category;

    @TableField(value = "image_url")
    private String imageUrl;

    private Integer popularity;

    private Integer status;

    @TableField(value = "created_time")
    private LocalDateTime createdTime;

    @TableField(value = "updated_time")
    private LocalDateTime updatedTime;

    @TableLogic
    @TableField(value = "is_deleted")
    private Boolean isDeleted;

    @TableField(value = "user_id")
    private Long userId;
} 